package com.etc.service;

import com.etc.dao.FruitsDao;
import com.etc.entity.Fruits;
import com.etc.utils.MybaitsUtils;


import java.util.List;

/**
 * @Author kalista
 * @Description 水果业务层
 * @Date 2020/12/17  11:28
 **/
public class FruitsService {

    //用户持久层
    private FruitsDao fruitsDao;

    public FruitsService(){
        fruitsDao =  MybaitsUtils.openSession().getMapper(FruitsDao.class);
    }


    /**
     * 查询全部水果
     * @return
     */
    public List<Fruits> findAll(){
        return fruitsDao.findAll();
    }

}
